package com.example.sourcesprng.jdk8._lambda;

import java.util.Arrays;

public class SwimLambdaTest {

    public static void main(String[] args) {
        UseLambda useLambda = new UseLambda();
//        useLambda.userSwimLambda(new String[]{"A", "B"}, (names)->{
//            Arrays.stream(names).forEach(name -> System.out.println(name));
//        });

        useLambda.userSwimLambda("小红", (name -> System.out.println(name)));

//        useLambda.userSwimLambda("小红", 18, (name, age) -> {
//            System.out.println(String.format("name：%s, age：%d", name, age));
//        });

//        useLambda.userSwimLambda((name, age)->{
//            System.out.println(String.format("name：%s, age：%d", name, age));
//        });
    }
}
